package top.loveyumin1314.music.lottery;

import com.google.common.collect.Maps;
import top.loveyumin1314.music.bean.LotteryBean;
import top.loveyumin1314.music.bean.UserActionBean;
import top.loveyumin1314.music.bean.UserListBean;

import java.io.IOException;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;

/**
 * author Kerry
 * date 2017/10/11
 * desp null
 */

public interface LotteryService {
    Map<String, LotteryBean> LOTTERY_USERS = Maps.newConcurrentMap();

    AtomicBoolean IS_START_LOTTERY = new AtomicBoolean(false);

    Object addLotteryUser(UserActionBean userActionBean) throws IOException;

    Object removeLotteryUser(UserActionBean userActionBean) throws IOException;

    UserListBean<LotteryBean> getLotteryList(UserActionBean userActionBean);

    Object startLottory(UserActionBean userActionBean) throws IOException;

    Object stopLottory(UserActionBean userActionBean) throws IOException;


}
